package exsun.jt808.data.jt809_data.alarm.main;

import exsun.jt808.data.jt809_data.BasicVehicleInfo;
import exsun.jt808.data.jt809_data.SendBaseEntity;
import lombok.Data;
import org.apache.commons.lang3.RandomUtils;

import java.util.Date;

/**
 * @Author: 何蓉
 * @Date: 2019/3/22 14:44
 * @Description: 上报报警信息消息
 */
@Data
public class UpWarnMsgAdptInfo extends SendBaseEntity {

    private BasicVehicleInfo basicVehicleInfo;

    /**
     * 报警来源 1
     * 0x00 车载终端
     * 0x01 企业监控平台
     * 0x02 政府监管平台
     * 0x03 其他
     */
    private int warnSrc = 0x00;

    /**
     * 报警类型  2 详见表75
     */
    private int warnType;

    /**
     * 报警时间 8
     */
    private Date warnTime;

    /**
     * 信息id 4
     */
    private int infoId;

    /**
     * 报警信息内容
     */
    private String infoContent;


    public UpWarnMsgAdptInfo(int warnType, Date warnTime, String infoContent,BasicVehicleInfo basicVehicleInfo) {
        this.basicVehicleInfo = basicVehicleInfo;
        this.warnType = warnType;
        this.warnTime = warnTime;
        this.infoId = RandomUtils.nextInt(0,Integer.MAX_VALUE);
        this.infoContent = infoContent;
    }


}
